package br.edu.eseg.brproject.model.action;

import br.edu.eseg.brproject.model.*;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityQuery;
import java.util.Arrays;

@Name("stakeholderList")
public class StakeholderList extends EntityQuery<Stakeholder> {

	private static final String EJBQL = "select stakeholder from Stakeholder stakeholder";

	private static final String[] RESTRICTIONS = { "lower(stakeholder.papel) like lower(concat(#{stakeholderList.stakeholder.papel},'%'))", };

	private Stakeholder stakeholder = new Stakeholder();

	public StakeholderList() {
		setEjbql(EJBQL);
		setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS));
		setMaxResults(25);
	}

	public Stakeholder getStakeholder() {
		return stakeholder;
	}
}
